package org.blankie.model.fs;

import java.io.File;
import org.blankie.lang.Validate;
import org.blankie.model.BlkPath;

public class BlkFSPath extends BlkPath {

    private final File file;

    BlkFSPath(File file) {
        Validate.parameterNotNull("file", file);
        this.file = file;
    }

    File getFile() {
        return file;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + file.hashCode();
        return result;
    }

    @Override
    public boolean equals(Object object) {
        if (object == null) {
            return false;
        } else if (this == object) {
            return true;
        } else if (getClass() != object.getClass()) {
            return false;
        } else if (!file.equals(((BlkFSPath) object).file)) {
            return false;
        } else {
            return true;
        }
    }
    
}
